<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="for" uri="http://www.springframework.org/tags/form" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Insert title here</title>
    <link href="${pageContext.request.contextPath}/css/layout.css" rel="stylesheet" type="text/css"/>
    <link href="${pageContext.request.contextPath}/css/add.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.x.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/cascadingMenu.js"></script>

</head>
<body>
<div class="place"><span>位置：</span>
    <ul class="placeul">
        <li><a href="${pageContext.request.contextPath}/backend/article/index" target="center">文章列表</a></li>
        <li><a href="#">修改文章</a></li>
    </ul>
</div>
<div class="formbody">
    <div class="usual">
        <div class="tabson">

            <form:form action="update" method="post" id="addgoodForm" enctype="multipart/form-data"
                       modelAttribute="article">
                <for:hidden path="id" value="${article.id}"/>
                <ul class="forminfo">
                    <li>
                        <label>缩略图<b>*</b></label>
                        <c:if test="${article.img != null}">
                            <img width="200px" src="<%=basePath%>${article.img}">
                        </c:if>
                        <input name="imgFile" id="thumbImage" type="file" multiple="multiple"/>
                    </li>
                    <li>
                        <label>code<b>*</b></label>
                        <input name="code" id="code" type="text" class="dfinput"
                               required="required" style="width:200px;" value="${article.code}"/>
                    </li>
                    <li>
                        <label>排序<b>*</b></label>
                        <input name="order" id="order" type="text" class="dfinput"
                               required="required" style="width:200px;" value="${article.order}"/>
                    </li>
                    <li>
                        <label>文章标题<b>*</b></label>
                        <input name="title" id="goodsName" type="text" class="dfinput"
                               required="required" style="width:500px;" value="${article.title}"/>
                    </li>
                    <li>
                        <label>简介<b>*</b></label>
                        <input name="description" class="dfinput" type="text" required="required"
                               style="width:100px;" value="${article.description}"/>
                    </li>
                    <li>
                        <label>文章内容<b>*</b></label>
                        <textarea name="content" required="required" class="dfinput">
                                ${article.content}
                        </textarea>
                    </li>
                    <li><label>&nbsp;</label>
                        <input type="submit" class="btn" id="btnPublish" value="提交"/>
                    </li>
                </ul>
            </form:form>
        </div>
    </div>
</div>
</body>
</html>